#include <stdlib.h>
#include <stdio.h>
#include <string.h>
//#include <pthread.h>

void* test_thread(int size)
{
	char buff[128];
	size += 1;

	void* p1 = malloc(10000 * size);
	void* p2 = malloc(100000 * size);
	void* p3 = malloc(1000000 * size);
	void* p4 = malloc(10000000 * size);

	memset(p1, 'U', 10000 * size);
	free(p2);
	memset(p3, 'U', 1000000 * size);
	free(p4);

	snprintf(buff, sizeof(buff), "malloc:%p,%p,%p,%p\n", p1, p2, p3, p4);

	return 0;
}


int main()
{
	test_thread(0);
	test_thread(1);
	test_thread(2);
	return 0;
}

